Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

NXTableVectors

Adopted By:	NXTableVector

Declared In:	eointerface/NXTableProtocols.h

Protocol Description

The NXTableVectors protocol defines methods that specify the formatting of fields in a vector (a row or column) of an NXTableView. A table view has a table vector object for each static vector. For example, suppose a table view has dynamic rows displaying values for individual employee records and it has three static columns displaying their last name, first name, and department. This table view then has a table vector for each of those columns, which displays the appropriate values for each record.

A table vector's NXFormatter consults the table vector for formatting information when it displays field values. A vector's formatting information, such as its font and alignment, is self-explanatory. One other element of a vector, however, is notÐthe vector's identifier, which is used by the table view's data source to access values. See the NXTableDataSources informal protocol specification for information about identifiers.

For an NXTableView set up with an EOController, the data source and the identifiers are EOColumnAssociations. Each association manages a single property in a vector, and the first association established for the table view manages them all. See the EOColumnAssociation class specification for more information.

Method Types

Accessing the formatter	- setFormatter:
- formatter

Accessing the identifier	- setIdentifier:
- identifier

Setting editability	- setEditable:
- isEditable

Controlling size	- setResizable:
- isResizable
- setAutosizable:
- isAutosizable
- sizeTo:
- size
- setMinSize:
- minSize
- setMaxSize:
- maxSize

Setting the title and formatting	- setTitle:
- title
- setTitleFont:
- titleFont
- setTitleAlignment:
- titleAlignment

Setting content alignment	- setContentAlignment:
- contentAlignment

Instance Methods

contentAlignment

- (int)contentAlignment

Returns the horizontal alignment of the vector's contents. The return value can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

formatter

- formatter

Returns the NXFormatter responsible for displaying fields in the vector.

identifier

- identifier

Returns the identifier for the vector, which the data source of the vector's table view uses to access values.

isAutosizable

- (BOOL)isAutosizable

Returns YES if the vector is autosizable (that is, if it resizes itself when the table view does), NO if not.

isEditable

- (BOOL)isEditable

Returns YES if the displayed vector is editable, NO if not.

isResizable

- (BOOL)isResizable

Returns YES if the vector is resizable (that is, if it permits the user to change a column vector's width or a row vector's height), NO if not.

maxSize

- (NXCoord)maxSize

Returns a vector's greatest permissible size (the width of a column or the height of a row).

minSize

- (NXCoord)minSize

Returns a vector's smallest permissible size (the width of a column or the height of a row).

setAutosizable:

- setAutosizable:(BOOL)flag

Sets according to flag whether the vector is automatically resizes itself when the table view is resized. Returns self.

setContentAlignment:

- setContentAlignment:(int)align

Sets the horizontal alignment of the vector's contents. align can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED. Returns self.

setEditable:

- setEditable:(BOOL)flag

Sets according to flag whether the vector's fields can be edited by the user. Returns self.

setFormatter:

- setFormatter:aFormatter

Sets the vector's formatter to aFormatter (an NXFormatter). Returns self.

setIdentifier:

- setIdentifier:anIdentifier

Sets the vector's identifier to anIdentifier. The data source of the vector's table view uses the identifier to access values. Returns self.

setMaxSize:

- setMaxSize:(NXCoord)aSize

Sets a vector's greatest permissible size to aSize. Returns self.

setMinSize:

- setMinSize:(NXCoord)aSize

Sets the vector's smallest permissible size to aSize. Returns self.

setResizable:

- setResizable:(BOOL)flag

Sets according to flag whether the vector is resizable. Returns self.

setTitle:

- setTitle:(const char *)title

Sets the title of the vector to title. Returns self.

setTitleAlignment:

- setTitleAlignment:(int)align

Sets the horizontal alignment of the vector's title. align can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED. Returns self.

setTitleFont:

- setTitleFont:aFont

Sets the font used to draw the vector's title to aFont. Returns self.

size

- (NXCoord)size

Returns the size of a single field in the vector.

sizeTo:

- (NXCoord)sizeTo:(NXCoord)aSize

Sets the size for the vector's fields to aSize. Returns self.

title

- (const char *)title

Returns the title of the vector.

titleAlignment

- (int)titleAlignment

Returns the horizontal alignment of the vector's title. The return value can be one of three constants: NX_LEFTALIGNED, NX_CENTERED, or NX_RIGHTALIGNED.

titleFont

- titleFont

Returns the Font for the vector's title.